package com.intelligentclass.services;

import com.intelligentclass.entity.Syllabus;
import com.intelligentclass.repositories.SyllabusRespository;
import org.springframework.stereotype.Service;

@Service
public class SyllabusService {

    private SyllabusRespository syllabusRespository;

    public SyllabusService(SyllabusRespository syllabusRespository) {
        this.syllabusRespository = syllabusRespository;
    }

    public String getNameByCid(int cid) {
        return syllabusRespository.getNameByCid(cid);
    }

    public Syllabus save(Syllabus syllabus) {
        return syllabusRespository.save(syllabus);
    }

    public Syllabus getByCidAndName(int cid, String name) {
        return syllabusRespository.getByCidAndName(cid, name);
    }

    public Syllabus getByCid(int cid){
        return syllabusRespository.getByCid(cid);
    }
}
